package com.manager.system.controller;

import com.manager.system.dao.pojo.Hello;
import com.manager.system.interfaces.IHelloService;
import entity.BaseCommand;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static javafx.scene.input.KeyCode.J;

/**
 * 〈一句话功能简述〉<br>
 * 〈功能详细描述〉
 *
 * @author 16080951(林健)
 * @Copyright (c) 2016 苏宁软件技术有限公司 版权所有
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Controller
@RequestMapping("/main")
public class HelloController extends BaseController {

    @Autowired
    private IHelloService iHelloService;

    @RequestMapping(value = { "/hello" }, method = RequestMethod.GET)
    public String test(HttpServletRequest request, @ModelAttribute("cmd") BaseCommand cmd) {

        List<Hello> result =  iHelloService.getHello();
        return "test";
    }

}
